<include file="Public:header" />











<script>
    function sendMsg(){
	    var ids=new Array();
		$('.sall').each(function(index, element) {
            if($(this).prop('checked')){
				ids.push($(this).next('input').val());
			}
        });
		if(ids.length>0){
			$.ajax({
				url:'{:U('sendMsg')}',
				data:'msg='+$('#save-source').val()+'&ids='+ids.toString(),
				type:'POST',
				dataType:"json",
				success: function(data){
					success('成功发送了'+data.info+'条信息！');
				}
			});
		}else{
			error('请选择要发送信息的对象！');
		}
    }
	
	function submitSuccess(status, info, data){
		
	}
</script>











<div class="container main"> <include file="Public:left" />
  <div class="w790">
  
  
  
  
  
  
  
  <div class="h">
      <form action="{:U('index')}" method="get" class="fr form-inline">
      
      
   
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="hidden" name="sortField" value="{$sortField}" />
        <input type="hidden" name="sortType" value="{$sortType}" />
        
        
        <input type="text" name="keywords" placeholder="输入搜索关键词" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
        
      <div style="clear:both;"></div> 
      </div>
  
  
   
  
   
   
    <div class="table_">
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
        <thead>
          <tr>
            <td align="center">ID</td>
            
            
            <td align="center">商品</td>
            
            <td align="center">昵称</td>
            <td align="center">内容</td> 
            <td align="center">头像</td>

            <td align="center">审核</td>
            <td align="center">发表时间</td>
            <td align="center">操作</td>
          </tr>
        </thead>
        <volist name="list" id="vo"> 
          <tr class="data_list">
            <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" /><input type="hidden" value="{$vo.openid}">{$vo.id}</td><td><a target="_blank" href="{:U('Product/edit', array('id' => $vo['product_id']))}"><img src="{:getThumbPath($vo['pimg_url'])}" width="80"></a></td>
            <td>{$vo.nickname}</td>
            
            <td>
            
            
            {$vo.level}星<br>
{$vo.content}
            </td>
            <td><img src="{$vo.img_url}" height="50"></td>
 

            <td align="center"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span>
                <else/>
                <span class="status0 status_btn" field="status,{$vo.id}"></span></eq></td>
            <td align="center">{:date('Y-m-d H:i:s',$vo['datetime'])}</td>
            <td align="center"><a href="##" onClick="art.dialog.open('{:U('edit',array('id'=>$vo['id']))}', {width: 800, height: 500,lock:true,title:'评论回复'});">回复</a> | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');">删除</a>
            
            </td>
          </tr>
          
        </volist>
      </table>
      
      
      
      <div class="pages">
        <div class="controlList fl">
        
        <a type="button" class="btn btn-sm btn-primary" id="button-download-modal" data-target="#downloadModal" role="button" data-toggle="modal"> <i class="glyphicon glyphicon-send"></i> 发送信息 </a> 
        <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="update_sort('id','sort','','{:U('dosort')}');"><i class="glyphicon glyphicon-refresh"></i> 更新排序</a> 
        
        </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
      
      
      
      
    </div>
  </div>
  <div class="clear"></div>
</div>


<div class="modal fade" id="downloadModal" tabindex="-1" role="dialog" aria-labelledby="downloadModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">发送信息</h4>
      </div>
      <div class="modal-body">
        <div id="download-logged" class="" >
          <div class="alert alert-info">输入您要发送的内容，然后点击发送。 </div>
          <p>
            <textarea style="width:100%; height:200px;" id="save-source"></textarea>
          </p>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-success" onClick="sendMsg();">发送</button>
        <button type="button" class="btn btn-default" id="cancel-save-btn" data-dismiss="modal">取消</button>
      </div>
    </div>
    
    
  </div>

</div>

<script>
    function updatePid(mid){
		if(!confirm('您确定要更新父ID吗？')){
			return false;
		}
		var pid = $('#member_'+mid).val();
		$.post('{:U('updatePid')}',{member_id:mid,pid:pid},function(data){
			if(data.status == 1){
				success(data.info);
			}else{
				error(data.info);
			}
		    
		},'json');
	}
</script>
<include file="Public:footer" />